package com.xy.constant.enums;

import java.util.HashMap;
import java.util.Map;

public enum DocxTemplateEnum {
    DOCX_TEMPLATE_MSSS(1, "pleadings.docx"),
    DOCX_TEMPLATE_VEHICLE_TRAFFIC_ACCIDENTS(2, "车辆交通事故.docx"),
    DOCX_TEMPLATE_PLEADINGS_FINANCIAL_LOAN_CONTRACTS(3, "金融借款合同.docx"),
    DOCX_TEMPLATE_PLEADINGS_Labor_DISPUTE(4, "劳动纠纷.docx"),
    DOCX_TEMPLATE_PLEADINGS_PRIVATE_LENDING(5, "民间借贷.docx");
    public final Integer typeId;
    public final String templateName;
    private static final Map<Integer, DocxTemplateEnum> TYPE_MAP = new HashMap<>();
    public int getTypeId() {
        return typeId;
    }
    public String getTemplateName() {
        return templateName;
    }
    private DocxTemplateEnum(int typeId, String templateName) {
        this.typeId = typeId;
        this.templateName = templateName;
    }
    static {
        for (DocxTemplateEnum docxTemplateEnum : values()) {
            TYPE_MAP.put(docxTemplateEnum.typeId, docxTemplateEnum);
        }
    }
    public static DocxTemplateEnum getDocxTemplateEnumByType(int type) {
        return TYPE_MAP.get(type);
    }
    public static String getTemplateNameByType(int type) {
        return TYPE_MAP.get(type).templateName;
    }

}
